package com.xinsoft.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * 发货通知明细
 * @TableName scm_sale_notice_item
 */
@TableName(value ="scm_sale_notice_item")
@Data
public class ScmSaleNoticeItem implements Serializable {
    /**
     * 发货通知明细ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 发货通知ID
     */
    @TableField(value = "sale_notice_id")
    private Integer saleNoticeId;

    /**
     * 库存批次
     */
    @TableField(value = "batch")
    private String batch;

    /**
     * 物料ID
     */
    @TableField(value = "material_id")
    private Integer materialId;

    /**
     * 出库数量
     */
    @TableField(value = "outstock_num")
    @Positive(message = "出库数量必须大于0")
    private BigDecimal outstockNum;

    /**
     * 仓库ID
     */
    @TableField(value = "warehouse_id")
    private Integer warehouseId;

    /**
     * 库位ID
     */
    @TableField(value = "wareh_item_id")
    private Integer warehItemId;

    /**
     * 源单主键
     */
    @TableField(value = "source_id")
    @NotNull(message = "源单id（sourceId）不能为空")
    private Integer sourceId;

    /**
     * 源单编号
     */
    @TableField(value = "source_code")
    @NotNull(message = "源单编码（sourceCode）不能为空")
    private String sourceCode;

    /**
     * 源单类型
     */
    @TableField(value = "source_type")
    private Integer sourceType;

    /**
     * 销售单价
     */
    @TableField(value = "sale_unit_price")
    private BigDecimal saleUnitPrice;

    /**
     * 销售总价
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 辅助单位
     */
    @TableField(value = "assist_uom")
    private Integer assistUom;

    /**
     * 换算系数
     */
    @TableField(value = "conv_coefficient")
    @Positive(message = "换算系数只能是正数（大于0）")
    private BigDecimal convCoefficient;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}